var fs  = require("fs");

var ct = fs.readFileSync('temp1.json','utf-8');

ct = JSON.parse(ct);

var qs = [];

ct.forEach(function(e){
	var data = e.data;

	data.forEach(function(d){
		var q = {};
		q.answer = d.answer;
		q.content = d.name;
		q.choose = d.outoption;
		qs.push(q);
	})
})

fs.writeFileSync('q1.json',JSON.stringify(qs));

console.log(qs.length);